<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GT-XXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'GT-XXXXXX');

  $(document).on('change', 'select', function(e) {
    gtag('event', 'widget', {
      action: 'select data',
      label: $(e.currentTarget).val()
    });
  });

  $(document).on('click', 'button', function() {
    gtag('event', 'button', { action: 'update plot' });
  });
</script>
